<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="product" tagdir="/WEB-INF/tags/product"%>
<title>货品选择器测试和演示页面</title>
<script type="text/javascript">
function myCallback(productSku){
	var returnString = "[Success]\r\n";
	returnString += "productSkuId:"+productSku.productSkuId+",";
	returnString += "productSkuName:"+productSku.productSkuName+",";
	returnString += "productSkuCode:"+productSku.productSkuCode+",";
	returnString += "imageUrl:"+productSku.imageUrl+",";
	returnString += "productKind:"+productSku.productKind+",";
	returnString += "productId:"+productSku.productId+",";
	returnString += "productName:"+productSku.productName+",";
	returnString += "productCode:"+productSku.productCode+",";
	returnString += "minOrderQuantity:"+productSku.minOrderQuantity+",";
	returnString += "orderSkuDisplayOption:"+productSku.orderSkuDisplayOption;
	alert(returnString);
}

function myCallback2(productSkus){
	var returnString = "[Success]\r\n";
	for(var i=0; i<productSkus.length; i++){
		var productSku = productSkus[i];
		returnString +=i+":";
		returnString += "productSkuId:"+productSku.productSkuId+",";
		returnString += "productSkuName:"+productSku.productSkuName+",";
		returnString += "productSkuCode:"+productSku.productSkuCode+",";
		returnString += "imageUrl:"+productSku.imageUrl+",";
		returnString += "productKind:"+productSku.productKind+",";
		returnString += "productId:"+productSku.productId+",";
		returnString += "productName:"+productSku.productName+",";
		returnString += "productCode:"+productSku.productCode+",";
		returnString += "minOrderQuantity:"+productSku.minOrderQuantity+",";
		returnString += "orderSkuDisplayOption:"+productSku.orderSkuDisplayOption+"\r\n";
	}	
	alert(returnString);
}

</script>
		
<input value="单个货品选择器" onclick="showDialogOfselector1()" type="button"/>
<product:productSkuSelector selectorId="selector1" callbackFunc="myCallback"/>

<input value="多个货品选择器" onclick="showDialogOfselector2()" type="button"/>
<product:productSkuSelector selectorId="selector2" callbackFunc="myCallback2" multiple="true"/>
		
